import { request } from '@/utils/request';
export default class Index {

    // 列表
    static getList (query) {
        return request({
            url: '/adient-pms/pad/deviceRepairRecord/page',
            method: 'get',
            params: query
        });
    }

    // 详情
    static devicedetail (no) {
        return request({
            url: `/adient-pms/pad/deviceRepairRecord/loadByNo/${no}`,
            method: 'get',
        });
    }

    //受理任务开始
    static repairing (no) {
        return request({
            url: `/adient-pms/pad/deviceRepairRecord/repairing/${no}`,
            method: 'put',
        });
    }
    
    //受理任务完成确认
    static repair (query) {
        return request({
            url: '/adient-pms/pad/deviceRepairRecord/repair',
            method: 'put',
            params: query
        });
    }

    // 字典
    static dictDetails (query) {
        return request({
            url: `/admin-v3/dictDetail/page`,
            method: 'get',
            params: query
        });
    }

    //受理任务取消
    static cancelRepair(query) {
        return request({
            url: '/adient-pms/pad/deviceRepairRecord/cancelRepair',
            method: 'put',
            params: query
        });
    }
}